package esercitazione1;

public class Decimal extends Number{
	
	public Decimal(String s){
		number = s;
	}

	@Override
	public int convertNumber() {
		try {
			return Integer.parseInt(number);
		} catch (NumberFormatException e) {
			return -1;
		}
	}

}
